﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace App.Models.Sys
{
    public class SysUserModel
    {
        [Display(Name = "Id")]
        public string Id { get; set; }

        [Display(Name = "用户名")]
        [Required(AllowEmptyStrings = false, ErrorMessage = "用户名不能为空")]
        public string UserName { get; set; }

        [Display(Name = "密码")]
        [Required(AllowEmptyStrings = false, ErrorMessage = "密码不能为空")]
        [StringLength(20, MinimumLength = 6, ErrorMessage = "密码必须在{2} 和{1}之间")]
        public string Password { get; set; }

        [Display(Name = "重复密码")]
        [Compare("Password", ErrorMessage = "您两次输入的密码不一致")]
        public string Password2 { get; set; }


        [Display(Name = "真实姓名")]
        public string TrueName { get; set; }

        [Display(Name = "身份证号")]
        [RegularExpression(@"\d{17}[\d|x]|\d{15}", ErrorMessage = "身份证号码格式错误")]
        public string Card { get; set; }

        [Display(Name = "手机号码")]
        public string MobileNumber { get; set; }

        [Display(Name = "电话号码")]
        public string PhoneNumber { get; set; }

        [Display(Name = "QQ")]
        public string QQ { get; set; }

        [Display(Name = "Email")]
        [RegularExpression(@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessage = "邮箱地址格式错误")]
        public string EmailAddress { get; set; }

        [Display(Name = "其他联系方式")]
        public string OtherContact { get; set; }

        [Display(Name = "省")]
        public string Province { get; set; }

        [Display(Name = "市")]
        public string City { get; set; }

        [Display(Name = "村")]
        public string Village { get; set; }

        [Display(Name = "地址")]
        public string Address { get; set; }

        [Display(Name = "是否启用")]
        public bool State { get; set; }

        [Display(Name = "创建时间")]
        public DateTime CreateTime { get; set; }

        [Display(Name = "创建人")]
        public string CreatePerson { get; set; }

        [Display(Name = "性别")]
        public string Sex { get; set; }

        [Display(Name = "生日")]
        public DateTime Birthday { get; set; }

        [Display(Name = "加入时间")]
        public DateTime JoinDate { get; set; }

        [Display(Name = "婚姻状况")]
        public string Marital { get; set; }

        [Display(Name = "政治身份")]
        public string Political { get; set; }

        [Display(Name = "国籍")]
        public string Nationality { get; set; }

        [Display(Name = "民族")]
        public string Native { get; set; }

        [Display(Name = "毕业学校")]
        public string School { get; set; }

        [Display(Name = "专业")]
        public string Professional { get; set; }

        [Display(Name = "学位")]
        public string Degree { get; set; }

        [Display(Name = "部门")]
        public string DepId { get; set; }

        [Display(Name = "PosId")]
        public string PosId { get; set; }

        [Display(Name = "Expertise")]
        public string Expertise { get; set; }

        [Display(Name = "工作状态")]
        public string JobState { get; set; }

        [Display(Name = "照片")]
        public string Photo { get; set; }

        [Display(Name = "Attach")]
        public string Attach { get; set; }

        [Display(Name = "拥有权限")]
        public string roles { get; set; }

        public string Flag { get; set; }//用户分配角色

    }


}
